function y = broyden(x)
%Broyden banded function
%x0=[-1,-1,...;-1,-1]
%fmin1=0 
%Author:Ji Lin
n=length(x);
y=ones(1,n);
y(1)=(3-2*x(1))*x(1)-2*x(2)+1;
for ii=2:n-1
y(ii)=(3-2*x(ii))*x(ii)-x(ii-1)-2*x(ii+1)+1;
end
y(n)=(3-2*x(n))*x(n)-x(n-1)+1;
y=sum(y.^2);